package com.tojaoomy.car.controller;

import java.sql.Date;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.tojaoomy.car.controller.vo.People;
import com.tojaoomy.car.service.PeopleService;

@RestController
@RequestMapping("/people")
public class PeopleController {

	@Resource
	private PeopleService peopleService;
	
	@RequestMapping("/save")
	public People save(){
		People people = new People();
		people.setSubject("test");
		people.setStartDate(new Date(System.currentTimeMillis()));
		people.setEndDate(new Date(System.currentTimeMillis() + 1000));
		people.setDescription("description");
		return peopleService.save(people);
	}
}
